gdk: Revert making get_size optional
authorBenjamin Otte <otte@redhat.com>
Mon, 19 Jul 2010 11:24:30 +0000 (13:24 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 26 Jul 2010 14:42:46 +0000 (16:42 +0200)
49a0ec6e95408e3484397602ad46e274cedbf98b added this hunk without
explanations and it's obviously wrong because failing to have a get_size
vfunc will now not set width and height and they'll end up with invalid
values.

In fact, the GdkDrawableImpl{X11,Win32,Quartz} functions do not have
get_size implemented, so the patch was most likely an attempt to work
around calling this function erroneously on the impl objects.

The correct fix is to call impl->wrapper instead.

gdk/gdkdraw.c

index 78c8dfeeec3f82972984fd3ad28a353d97f8707e..8dc121413a7b8e9c8b1d24520476e2d1ee124850 100644 (file)
@@ -115,8 +115,7 @@ gdk_drawable_get_size (GdkDrawable *drawable,
 {
   g_return_if_fail (GDK_IS_DRAWABLE (drawable));
 
-  if (GDK_DRAWABLE_GET_CLASS (drawable)->get_size != NULL)
-    GDK_DRAWABLE_GET_CLASS (drawable)->get_size (drawable, width, height);  
+  GDK_DRAWABLE_GET_CLASS (drawable)->get_size (drawable, width, height);  
 }
 
 /**